import { lazy } from 'react'
import Home from '../views/Home/Index'
import Main from '../views/Home/Main/Main'
// import Cart from '../views/Home/Cart/Cart'

const Cart = lazy(() => import('../views/Home/Cart/Cart'))


const routes = [
    {
        path: '/home',
        component: Home,
        children: [
            {
                path: '/home/main',
                component: Main
            },
            {
                path: '/home/cart',
                component: Cart
            },
            {
                path: '/home',
                redirect: '/home/main'
            }
        ]
    },
    {
        path: '/',
        redirect: '/home'
    }
]

export default routes